<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ include file="/commons/taglibs.jsp" %>

<html>
<head>
<title>部门列表</title>
<%@ include file="/commons/meta.jsp" %>
<script type="text/javascript"  src="<c:out value="${ctx}"/>/scripts/listRelated.js"></script>
<script type="text/javascript"  src="<c:out value="${ctx}"/>/scripts/ec.js"></script>
<link href="<c:out value="${ctx}"/>/widgets/extremecomponents/extremecomponents.css" rel="stylesheet" type="text/css">
</head>
<body class="contentbody" style="overflow:hidden" onLoad="resizeDivContent();init();"> 
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="toolbar"  id="operationBar"> 
  <tr> 
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
        <tr> 
          <td width="35%" class="content_table_name1">部门管理</td> 
          <td width="65%" > <div align="right"> 
              <table width="45%" border="0" cellpadding="0" cellspacing="0" class=table_margin> 
                <tr>
                  <td>&nbsp;</td>
                  <td width="20"><input name="cmdAdd" type="submit" class="button2up" onClick="openWindow('<c:out value="${ctx}"/>/actions/departmentDispatcher.do?method=add',655,320,'addDepartment');" value="新建"></td> 
                  <td width="20"><input name="cmdDelete" type="submit" class="button2up" value="删除" onClick="delDocuments('<c:out value="${ctx}" />/actions/departmentDispatcher.do?method=delete', '部门信息');"></td> 
                </tr> 
              </table> 
            </div></td> 
        </tr> 
      </table></td> 
  </tr> 
</table> 
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="ejectbody_top_bg_margin"  id="content"> 
  <tr> 
    <td width="75%"><table class="id_01" width="100%" border="0" cellpadding="0" cellspacing="0"> 
        <tr> 
          <td width="7"><img id="top_table_01" src="<c:out value="${ctx}"/>/images/top_table_01.gif" width="7" height="13" alt="" /></td> 
          <td width="100%" background="<c:out value="${ctx}"/>/images/top_table_02.gif"><img src="<c:out value="${ctx}"/>/images/top_table_02.gif" alt="" name="top_table_02" width="619" height="13" id="top_table_02" /></td> 
          <td width="10"><img id="top_table_03" src="<c:out value="${ctx}"/>/images/top_table_03.gif" width="17" height="13" alt="" /></td> 
        </tr> 
      </table> 
      <table width= "100%" height="100%" align="left" cellpadding="0" cellspacing="0"> 
        <tr> 
          <td width="7" height="95%" background="<c:out value="${ctx}"/>/images/eject_windows_04.gif" class="ineject_right_bg"></td> 
          <td width="98%" valign="top" class="search_border"><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
              <tr> 
                <td><table width="100%" border="0" cellpadding="４" cellspacing="４"> 
                    <tr> 
                      <td>&nbsp;</td> 
                    </tr> 
                  </table></td> 
              </tr> 
            </table>
            <div class="divcontent" id="divContent" style="height:375px;"> 
              <ec:table var="department" items="departmentList"
              	action="${ctx }/actions/departmentDispatcher.do?method=list"	
              	retrieveRowsCallback="limit" 
              	filterRowsCallback="limit"
              	sortRowsCallback="limit"
              	autoIncludeParameters="false" filterable="false"
              	view="messages" width="100%"
              >
              	<ec:exportXls fileName="test.xls" tooltip="Excel"/>
              	<ec:row>
              		<ec:column width="40" property="docId" filterable="false"
						sortable="false" alias="checkbox" title="全选" viewsAllowed=""
						value="${department.id }" cell="selectCell" viewsDenied="xls"
						headerCell="customSelectallHeaderCell"/>
					<ec:column property="rowcount" cell="rowCount" sortable="false"
						title="序号" width="60" />
					<ec:column property="name" title="部门名称" width="120"
						filterCell="filterDroplistCell">
						<a href="#" class="a9" onclick="openWindow('<c:out value="${ctx}"/>/actions/departmentDispatcher.do?method=show&id=<c:out value="${department.id}" />',655,320,'showDepartment');"><c:out value="${department.name}" /></a>
					</ec:column>
					<ec:column property="remark" title="备注" width="120" />
					<ec:column property="null" title="查看人员列表" viewsDenied="xls">
						<a href="<c:out value="${ctx}"/>/actions/personDispatcher.do?method=list&departmentId=<c:out value="${department.id}" />" class="a9" >点击进入</a>
					</ec:column>
              	</ec:row>
              </ec:table>
            </div>
            </td> 
          <td width="1%" background="<c:out value="${ctx}"/>/images/eject_windows_06.gif"></td> 
        </tr> 
        <tr> 
          <td width="7" height="5%" background="<c:out value="${ctx}"/>/images/eject_windows_08.gif"><img src="<c:out value="${ctx}"/>/images/eject_windows_07.gif" width="7" height="31" alt="" /></td> 
          <td class="ejectturnpage_Bg">
          <!-- 放置翻页和导出excel按钮：如果不需要导出excel则不需要写fileName参数（删掉那一行即可）-->
	          <jsp:include flush="true" page="/commons/ec.jsp">
		          	<jsp:param name="action" value="<%= request.getContextPath()+"/actions/departmentDispatcher.do?method=list" %>" />
		          	<jsp:param name="fileName" value="我们的.xls" />
	          </jsp:include>
	      </td> 
          <td background="<c:out value="${ctx}"/>/images/eject_windows_08.gif"><img src="<c:out value="${ctx}"/>/images/eject_windows_09.gif" width="12" height="31" alt="" /></td> 
        </tr> 
      </table></td> 
  </tr> 
</table> 
</body>
</html>